<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>优惠卡</title>
<link href="css/all.css" type="text/css" rel="stylesheet">
<link href="css/index.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="javascripts/table.js"></script>
 <script>
   function OpenModalWindow(url,width,height,params){
		var returnValue = window.showModalDialog(url, [params],'dialogWidth:'+width+'px;dialogHeight:'+height+'px;help:no;status:no');
		if(returnValue != "" && returnValue != undefined){
			refresh();
		}
	}
		function getAll() {
		$("#typelist").html("");
		$.ajax( {
		type : "post",
		url : "doDis!getAllDiscount.action",
		dataType : "json",
		success : function(data) {
			//var dataObj=eval("("+data+")");//转换为json对象 
			$.each(data.data.list, function(i, item) {
					$("#typelist").append("<tr align='center' bgcolor='#FBFCE2' height='25'><td width='6%'>"+item.id+"</td><td width='6%'>"+item.disId+"</td><td width='6%'>"+item.disPrice+"</td><td width='6%'>"+item.disTitle+"</td><td width='6%'>"+item.disCount+"</td><td width='6%'>"+item.disTime+"</td><td  width='6%'><a href='#'><img src='images/ck.png' title='查看'></a>&nbsp;<a href='#'><img src='images/edit.png' title='修改'></a>&nbsp;<a href='#'><img src='images/del.png' title='删除'></a></td><tr/>");
				});
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				alert(errorThrown);
			}
		});
	}
   </script>
</head>
	<body onload="getAll()">
		<table width="100%" height="100%" border="0" cellspacing="0"
			cellpadding="0">
			<tr>
				<td height="30" background="images/righttop.png"
					style="height: 33px;">

					<table width="100%" border="0" cellspacing="2" cellpadding="0">
						<tr>

							<td width="46%" valign="middle">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="5%" align="right">
											<img src='images/tb.gif' />
										</td>
										<td width="95%" style="color: #444;">
											你当前的位置：优惠卡
										</td>
									</tr>
								</table>
							</td>

							<td width="54%"></td>

						</tr>
					</table>

				</td>
			</tr>


			<tr>
				<td>
					<table width="100%" height="100%" border="0" cellspacing="0"
						cellpadding="0">
						<tr height="62">
							<td valign="top">
								<table class="search-table">
									<colgroup>
										<col style="width: 20%" />
										<col style="width: 30%" />
										<col style="width: 20%" />
										<col style="width: 30%" />
									</colgroup>
									<tr>
										<th>
											会员卡名称：
										</th>
										<td>
											<input type="text" class="inputstyle" />
										</td>
										<th>
											地区：
										</th>
										<td>
											<input type="text" class="inputstyle" />
										</td>
									</tr>
									<tr>
										<td height="30" colspan="4">
											<div style="text-align: center;">
												<input type="button" class="buttonstyle" value="查询" />
												<input type="reset" class="buttonstyle" value="清空" />
											</div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td valign="top">
								<table class="list-table" cellpadding="0" cellspacing="0">
									<tr class="lb_biaoti">
										<th>
											序号
										</th>
										<th>
											商家ID
										</th>
										<th>
											价格
										</th>
										<th>
											名称
										</th>
										<th>
											下载次数
										</th>
										<th>
											有效时间
										</th>
										<th>
											操作
										</th>
									</tr>
									<tbody id="typelist">
									</tbody>
								</table>
							</td>
						</tr>
						<tr>
							<td>
								<div class="pagediv">
									<span class="pagination">共20条记录&nbsp;&nbsp;2/2页 <a
										href="#">首页</a> <a href="#"><span style="color: blue;">上一页</span>
									</a> <a href="#"><span style="color: blue;">下一页</span>
									</a> <a href="#">尾页</a> 第<select>
											<option>
												1
											</option>
											<option>
												2
											</option>
											<option>
												3
											</option>
											<option>
												4
											</option>
											<option>
												5
											</option>
											<option>
												6
											</option>
											<option>
												7
											</option>
											<option>
												8
											</option>
											<option>
												9
											</option>
											<option>
												10
											</option>
										</select>页</span>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>

		</table>
	</body>
</html>
